<?php

class BaseAction extends Action {
    public function __construct() {
        parent::__construct();
        if(isset($_SESSION['admin_id'])&&$_SESSION['admin_id']>0){
            $admin=D("admin")->where(array("admin_id"=>$_SESSION['admin_id']))->find();
            $this->assign("admin",$admin);
        }else{
            $this->redirect("/admin/login/login/",array(),0,'');
        }
        
    }
    
}
?>
